# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Jim Ferguson <ferguson@ncsa.uiuc.edu>
# Contributor: Xi0N <jonandermonleon@gmail.com>
# Contributor: goll <adrian.goll+aur[at]gmail>

pkgname=iperf3
pkgver=3.12
pkgrel=2
pkgdesc='TCP, UDP, and SCTP network bandwidth measurement tool'
url='https://github.com/esnet/iperf'
arch=('loong64' 'x86_64')
license=('BSD')
depends=('glibc' 'openssl')
provides=('libiperf.so')
source=(https://downloads.es.net/pub/iperf/iperf-${pkgver}.tar.gz)
sha512sums=('51797a2e902e927102baf19cd16dc4a0f32eb27876039ed4b2b929036421c323acd0f054014afabccf2ca7eb5490ff84f6f330fa0c54ea7155e125321088a162')
b2sums=('c6ff4c5650363831aa5c0ddca80da1353d8ae0459c2a9a00e5b0532dc4172d1033a913cf87f052c64b9361e2082a077dd3cfae09bf34c513cd5bd0cc8c4d7d05')

build() {
  cd iperf-${pkgver}
  ./configure --prefix=/usr
  make
}

check() {
  cd iperf-${pkgver}
  make check
}

package() {
  cd iperf-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 examples/*{.am,.in,.c} -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
}

# vim: ts=2 sw=2 et:
